import {doGet,SYS_INFO} from './util.js'
import * as ResponseStatus from './response-status.js'
export const loadSysInfo = (self) => {
	doGet('/sys-config/any/pic-config', {}, {}, false).then(response => {
		let [error, res] = response
		if (res.data.code === ResponseStatus.OK) {
			doGet('/sys-config/any/txt-config', {}, {}, false).then(response1 => {
				let [error1, res1] = response1
				if (res1.data.code === ResponseStatus.OK) {
					let sysInfo = res.data.data
					let txtInfo = res1.data.data
					if (sysInfo && txtInfo) {
						self.sysInfo = JSON.parse((JSON.stringify(sysInfo)+JSON.stringify(txtInfo)).replace(/}{/,','));
					}
				}
			}).catch(err1 => {
				console.log(err1)
			})
		}
	}).catch(error => {
		console.log(error)
	})
} 